<html>
<head>
<title>WIKINDX DOCUMENTATION</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/wikindx2/docs/docs.css" type="text/css" />
</head>

<body bgcolor="#FFFFFF" text="#000000">
<h2>WIKINDX ~ Languages</h2>
<p><strong>The instructions below for a manual coding of the localization should be ignored if you are using the localization plug-in module. Using the module is the preferred method and it may be downloaded from the <a href="http://www.sourceforge.net/projects/wikindx/">WIKINDX sourceforge</a> site. </strong></p>
<p>This file and currently used languages and their extensions can be found at the <A href="https://sourceforge.net/docman/?group_id=94435" target="_blank">WIKINDX sourceforge documents</A> section.
</p>
<p>WIKINDX provides multi-language support for all browser output that does not originate from the database. This 
includes all labels for form elements, hint messages, page headings, errors and menu/submenu items.
</p>

Each of the classes in the <em>languages/xx/</em> folder contain internally used
methods that have associative arrays (translation 
arrays) that are duplicated in each method where the only difference is the
arrays' value string depending on the 
translation. The array name and keys should remain in English and be the same across all the class's methods.
</p>
<p>
Any occurrence of the three-character code '###' anywhere in the translation arrays' value strings is replaced by an 
optional string passed via the class's <a href="../classes/messages/textMethod.html">text()</a> method. Depending on the language requirements, '###' can be positioned where you want.  WIKINDX will add a space before it - if you want a space after it, you need to add that yourself.
</p>
<p>
Further help is supplied in comments in the English language files.
</p>

<p>
To set up a new language:
<br>1/ copy the files in <em>languages/en/</em> to a new folder in
<em>languages/</em>. Please ensure that the name of this new folder is not
already taken by another language by checking the <A href="https://sourceforge.net/docman/?group_id=94435" target="_blank">documentation at Sourceforge</A>.
<br>2/ in each file, change the '_xx' extension of the class name and
constructor name to match the name of the folder you have created under
<em>languages/</em>.
<br>3/ translate the values of each array or appropriate text in each of the new
files.  <b>Do not touch the keys of arrays!</b>
<br>4/ create a file <em>languages/xx/description.txt</em> and add a one-line
description that will be displayed to users when they select a language in
their preferences.
<br>
5/ if you wish to make your translation available to other WIKINDX users,
please tar and zip the <em>xx/</em> folder and contact the WIKINDX admins via
sourceforge who will be happy to add your creation to the downloads list.<br>
6/ all language files should be encoded as UTF-8. If you're unable to do this, the WIKINDX developers will be happy to do this for you. </p>
<p>
For example, if you wish to supply a Klingon translation, create a new folder
<em>languages/kg/</em> (having checked it's not already in use) and copy the
files in <em>languages/en/</em> to that new folder. Change
the extension of the class and constructor names in your copied files to match
the new folder name (e.g. ABOUT_en becomes ABOUT_kg). Translate appropriately.
In <em>languages/kg/description.txt</em>, add one line with the text
<em>Klingon</em>.
</p>
<p>
Finally, tar and zip your new folder so that the tar file's contents look like:
<pre>	kg/description.txt
	kg/ABOUT.php
	kg/MESSAGES.php
	etc.
</pre>
and contact the WIKINDX admins via sourceforge to have your language pack
listed for download.
</p>
<p>
Please note, with each WIKINDX update, there are likely to be changes and
additions to the core English language pack.  If a user is using another
language pack and a message is not found, then the appropriate message from the
English pack will be displayed.  As coding progresses, amendments and additions
to the English language pack will be posted to the <A href="https://sourceforge.net/docman/?group_id=94435" target="_blank">WIKINDX sourceforge
documentation</A> section for you to translate and update accordingly.
</p>
<p>
You can temporarily disable a language by renaming that language's
description.txt file (e.g. to <em>description.txt~</em>).  <strong>It is not
advised to remove or disable the English language files.</strong>
</p>

<p>
CONSTANTS.php is used to handle numeric conversions and conversions to month names. This should be reasonably straightforward to translate but the cardinal to ordinal conversion (e.g. 10 -> 10th) may require a little PHP programming depending on your language. It should be clear what to do from the code in the English language CONSTANTS.php.
</p>
<p align="right"><a href="../index.html">WIKINDX home</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.html">WIKINDX usage</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="../classes/index.html">WIKINDX classes</a>
</p>
</body>
</html>
